<template>
  <el-image-viewer :z-index="6666" v-if="isShow" :onClose="handleClose" :url-list="imgList"></el-image-viewer>
</template>

<script>
import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
export default {
  name: "imgPreview",
  data() {
    return {
      isShow: true,
      imgList: []
    }
  },
  components: {
    ElImageViewer
  },
  methods: {
    show(url) {
      this.imgList = [url];
    },
    handleClose() {
      this.isShow = false;
    }
  }
}
</script>

<style lang="scss" scoped>
::v-deep .el-image-viewer__img{
  width: 50% !important;
  max-height: max-content !important;
}
</style>